home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / misc / ada1110b.lha / Examples / Dine / philspec.ada < prev    next >
Encoding:
Text File  |  1992-03-02  |  646 b   |  21 lines

  1. PACKAGE Phil IS
  2. -- Specification for dining philosopher task.
  3. -- Assumption is that head waiter will name a philosopher and assign
  4. -- the chopsticks to be used by that philosopher.
  5. -- Philosopher states are used by monitoring program (Head_Waiter).
  6. -- Michael B. Feldman, The George Washington University, November 1990.
  7.  
  8.   
  9.   TASK TYPE Philosopher IS
  10.     
  11.     ENTRY Come_To_Life (My_ID :      Positive; 
  12.                         Chopstick1 : Positive;
  13.                         Chopstick2 : Positive);
  14.  
  15.   END Philosopher;
  16.  
  17.   TYPE States IS (Breathing, Thinking, Eating, Done_Eating,
  18.                     Got_One_Stick, Got_Other_Stick);
  19.  
  20. END Phil;
  21.